#pragma once

#include "hzpch.h"

#include "core.h"
#include "event/event.h"
#include "log.h"

namespace Hazel
{

struct WindowProps
{
    std::string Title;
    uint32_t Width, Height;

    WindowProps(const std::string &title = "hazel engine", uint32_t width = 1200, uint32_t height = 720)
        : Title(title),Width(width), Height(height)
    {
    }
};

// interface representing a desktop system based on window
class HAZEL_API Window
{
  public:
    using EventCallbackFn = std::function<void(Event &)>;

    virtual ~Window()
    {
    }
    virtual void OnUpdate() = 0;

    virtual uint32_t GetWidth() const = 0;
    virtual uint32_t GetHeight() const = 0;

    // window attributes
    virtual void SetEventCallback(const EventCallbackFn &callback) = 0;
    virtual void SetVSync(bool enable) = 0;
    virtual bool IsVSync() const = 0;

    virtual void *GetNativeWindow() const = 0;
    static Scope<Window> Create(const WindowProps &prop = WindowProps());
};
} // namespace Hazel